package com.common.www.bean.entity.programme;


import org.springframework.boot.base.jpa.domain.annotations.QueryCacheable;
import org.springframework.boot.base.jpa.domain.entity.NumberIdentityEntity;
import com.common.www.bean.entity.project.Project;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import lombok.*;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.validator.constraints.Length;

import javax.persistence.*;

/**
 * 方案对比
 *
 * @param
 * @author andyliu
 * @date 5/28/2018 4:23 PM
 * @return
 */
@DynamicUpdate(true)
@DynamicInsert(true)
@Entity
@Getter
@Setter
@QueryCacheable
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Table()
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "方案对比返回参数")
public class ContrastScheme extends NumberIdentityEntity {
    /**
     * 参与项目
     */
    @JsonIgnoreProperties(value = {""})
    @ManyToOne()
    private Project project;
    /**
     * 序号
     */
    @Column(length = 11)
    private Integer sort;
    /**
     * 类别
     */
    @Column(length = 64)
    private String category;
    /**
     * 小项
     */
    @Column(length = 64)
    private String minorItems;
    /**
     * 细项    固定58个细项
     */
    @Column(length = 128)
    private String detailsTerm;
    /**
     * 理论最优方案
     */
    @Column(length = 1024)
    private String optimalSolution;
    /**
     * 评估后拟定标方案
     */
    @Column(length = 1024)
    private String proposedPlan;
    /**
     * 评估后拟定标方案-理论最优方案的差异金额（以市场价测算/万元）
     */
    @Column(length = 1024)
    private String differenceAmount;
    /**
     * 差异分析
     */
    @Column(length = 4096)
    @Length(max=4096,message = "备注最长不超过4096位")
    private String differentialAnalysis;
    /**
     * 招标方案(细项内容)
     */
    @Column(length = 128)
    private String inviteTendersScheme;
    /**
     * 招标方案文件名
     */
    @Column(length = 128)
    private String inviteTendersSchemeFileName;

}